/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package Respaldo;

import DAO.DaoPersona;
import Modelo.Persona;
import java.sql.SQLException;

/**
 *
 * @author VMJorgeA
 */
public class BeanPer {

    public String getCedula() {
        return cedula;
    }

    public void setCedula(String cedula) {
        this.cedula = cedula;
    }

    public Persona getUserActual() {
        return userActual;
    }

    public void setUserActual(Persona userActual) {
        this.userActual = userActual;
    }
    /**
     * Creates a new instance of BeanPer
     */
    private String cedula;
    private Persona userActual;

    public BeanPer() {
    }

    public String buscar() throws SQLException {
        Persona user = DaoPersona.getInstance().BuscarPersona(cedula);
        if (user != null) {
            userActual = user;
            return "yes";
        } else {
            return "no";
        }
    }

    public String retorno() {
        return "returnI";
    }
}
